<%@ page language="java"  import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    <title>修改userrole</title>
    <script language="javascript">
    function update(){
	   var name=document.getElementsByName("name")[0];
	   if(name.value ==null || name.value  == ""){
	       alert("name不能为空……");
	       name.value ="";
	       name.focus();
	       return false;
	    }
	   var available=document.getElementsByName("available")[0];
	   if(available.value ==null || available.value  == ""){
	       alert("available不能为空……");
	       available.value ="";
	       available.focus();
	       return false;
	    }
	   document.forms[0].submit();
	}
    function goback(){
       location.href="userroleView.do";
    }
   </script>
  </head>
  <body>
  <form action="userroleUpdate.do" method="post">  
  <table bgcolor="#CCFFFF" border ="0" bordercolor="#969696"  width="100%" cellpadding="3" cellspacing="0">
	<tr bgcolor="#99CCFF"><td colspan="100%">userroleUpdate</td></tr>
    <tr><td colspan="100%"><hr size="1" color="#9999FF"></hr></td></tr>
	 <tr><td>id：
	 <input type="text" readonly  name="id" value="${userrole.id}"></td></tr>
	 <tr><td>name：
	 <input type="text"  name="name" value="${userrole.name}"></td></tr>
	 <tr><td>available：
	 <input type="text"  name="available" value="${userrole.available}"></td></tr>
	 <tr><td colspan="100%"><hr size="1" color="#9999FF"></hr></td></tr>
	 <tr height="50">
	<td colspan="100%" align="right">
	<input type="button" onclick="update()" value="update" style="background:#CCFFFF"/>&nbsp;&nbsp;&nbsp;
    <input type="button" onclick="goback()" value="goback" style="background:#CCFFFF"/>&nbsp;&nbsp;&nbsp;&nbsp;
	</td></tr>
 </table>
  </form>
  </body>
</html>

